<?php

namespace app\Admin\model;

use think\Model;

class Good extends Model
{
    protected $table = "good";

    public function brand(){
        return $this->belongsTo('Brand','bid','id')->bind('bname');
    }

    public function type(){
        return $this->belongsTo('Type','tid','id')->bind('tname');
    }

    public function images(){
        return $this->hasMany('Images','good_id','id');
    }
}
